<script>
jQuery(document).ready(function($){	

	$("#ver_provas").click(function() {

		var student = "<?php echo $student?>";
		var unitid = "<?php echo $unitid?>";
		
		var url = "<?php echo WWW_APP ?>" + "follow/exams/student/" + student + "/unit/" + unitid; 

		window.location.href = url;
	}); 

	$("#voltar").click(function() {

		var student = "<?php echo $student?>";
		var unitid = "<?php echo $unitid?>";
		
		var url = "<?php echo WWW_APP ?>" + "follow/units/student/" + student; 

		window.location.href = url;
	}); 
});
</script>
<div id="log">
	<div id="sumary_view">
		<?php echo $treeview;?>
	</div>
	
	<?php 
	if(!empty($sumConcepts)) {
	?>
	<table id="table_log" border="3px">
		<tr id="cabecalho">
			<td>Conceito</td>
			<td>Total de questões sobre o conceito</td>
			<td>Quantidade de acertos</td>
			<td>Quantidade de erros</td>
		</tr>
		
		<?php foreach($allConcepts as $key=>$concept):?>
		<tr>
			<td>
				<?php echo $concept;?>
			</td>
			<td>
				<?php echo $sumConcepts[$key] ? $sumConcepts[$key] : 0;?>
			</td>
			<td>
				<?php echo $conceptsCorrect[$key]? $conceptsCorrect[$key] : 0;?>
			</td>
			<td>
				<?php echo $conceptsIncorrect[$key] ? $conceptsIncorrect[$key] : 0;?>
			</td>
		</tr>
		<?php endforeach;?>		
	</table>
	
	<br class="clear" />
	
	<input id="ver_provas" type="button" value="Ver provas" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only right"/>
	<input id="voltar" type="button" value="Voltar" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only right"/>
	
	
	<?php 
	}else {
		echo "<p>O aluno ainda não fez prova.</p>";		
	}
	?>
	
	<br class="clear" />
	
</div>
